from concurrent.futures import ThreadPoolExecutor


def get_result(future):
    print(future.result())


def poll(s):
    print(s)
    result = "poll_result_d%"
    result_format = result.format(s)
    return result_format


if __name__ == '__main__':
    pool = ThreadPoolExecutor(max_workers=4)
    i = 0
    for i in range(100):
        i = i + 1
        submit = pool.submit(poll, i)
        submit.add_done_callback(get_result)
